package com.itheima.controller;

import com.itheima.service.ChannelService;
import com.itheima.vo.MediaChannelVo;
import com.itheima.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author :wujunjie
 * createTime :2023-01-02 22:27
 * description :
 */
@RestController
@RequestMapping("/api/v1/channel")
public class ChannelController {
    @Autowired
    private ChannelService channelService;
    @GetMapping("/channels")
    public Result selectAllChannels(){
        List<MediaChannelVo> mediaChannelVo=channelService.selectAllChannels();
        return Result.success(mediaChannelVo);
    }

}
